<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org">
<head >
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
    @@include("header.jsp"){}$$
</head>
<body>
<body>
<!-- 布局容器 -->
<div class="layui-layout layui-layout-admin">
    <!-- 头部 -->
    <div class="layui-header">
        <div class="layui-main">
            <div class="top-left">
                <!-- logo -->
                <a href="javascript:;" class="logo">华南农业大学故障报修系统后台</a>
                <a href="javascript:;" class="menu-flexible ml10">
                    <i class="layui-icon">&#xe635;</i>
                </a>
            </div>
            <!-- 头部右侧操作 -->
            <ul class="layui-nav operate">
                <li class="layui-nav-item">
                    <a href="javascript:;" >${session.cUser.username!}</a>
                    <dl class="layui-nav-child">
                        <dd>
                            <a href="javascript:;" class="edit-password">修改密码</a>
                        </dd>
                        <dd>
                            <a href="/pc/logout.html">退出登录</a>
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <!-- 左侧菜单 -->
    <div class="layui-side layui-bg-black left-menu-all ">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree left-menu" lay-filter="left-menu">
                <li class="layui-nav-item layui-this">
                    <a href="javascript:;" data-url="/pc/index" data-id="-1">后台首页</a>
                </li>
                @@ for(menu in menuList){ $$
                <li class="layui-nav-item" ><!--th:each="menu : ${menuList}"-->
                    <a data-url="${ctxPath!}/pc${menu.url!}" data-id="${menu.id!}">${menu.name!}</a>
                    @@ if(isNotEmpty(menu.subPerms)){
                       for(subMenu in menu.subPerms){ $$
                    <dl class="layui-nav-child">
                        <dd>
                            <a href="javascript:;" data-url="${ctxPath!}/pc${subMenu.url!}" data-id="${subMenu.id!}" >${subMenu.name!}</a>
                        </dd>
                    </dl>
                    @@ }
                       } $$
                </li>
                @@ } $$
            </ul>
        </div>
    </div>

    <!-- 主体 -->
    <div class="layui-body">
        <!-- 顶部切换卡 -->
        <div class="layui-tab layui-tab-card" lay-filter="top-tab" lay-allowClose="true">
            <ul class="layui-tab-title"></ul>
            <div class="layui-tab-button">
                <a href="javascript:;"><i class="layui-icon">&#x1002;</i></a>
            </div>
            <div class="layui-tab-content"></div>
        </div>
    </div>

    <!-- 底部 -->
    <!--<div class="layui-footer">-->
        <!--&copy; 2018 ZhouTian Tech. All Rights Reserved-->
    <!--</div>-->
</div>

<script type="text/javascript" src="/static/js/admin.js"></script>
<script>
    layui.use(['jquery', 'form', 'layer', 'table'], function () {
        var $ = layui.jquery,
            layer = layui.layer,
            table = layui.table;

        // 修改密码
        $(document).on("click", ".edit-password", function () {
            layer.open({
                type: 2
                , area: ['450px', '330px']
                , title: "修改密码"
                , content: '/pc/sys/user/editPw'
            });
        });
    });
</script>

</body>
</html>